package com.k8.nacosRegistry;

import com.k8.common.factroy.BeanFactory;
import com.k8.registry.AbstractRegistryFactory;
import com.k8.rpc.registry.Registry;
import com.k8.rpc.url.URL;

public class NacosRegistryFactory extends AbstractRegistryFactory {
    BeanFactory beanFactory;

    @Override
    public void beanFactoryAware(BeanFactory beanFactory) {
        this.beanFactory = beanFactory;
    }

    @Override
    public Registry getRegistry(URL url) {
        return new NacosRegistry(url, beanFactory);
    }
}
